package com.srlg.liteflow.config;

import com.yomahub.liteflow.lifecycle.PostProcessChainExecuteLifeCycle;
import com.yomahub.liteflow.slot.Slot;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TestChainExecuteLifeCycle implements PostProcessChainExecuteLifeCycle {

    @Override
    public void postProcessBeforeChainExecute(String chainId, Slot slot) {
        //do something
        log.info("execute chain id:{}, slot:{}", chainId, slot);
    }

    @Override
    public void postProcessAfterChainExecute(String chainId, Slot slot) {
        //do something
        log.info("execute chain id:{}, slot:{}", chainId, slot);
    }
}